<template>
    <input type="text" v-bind="$attrs" @change="inputChange($event)">
</template>

<script lang="ts">
import { defineComponent, PropType } from "@vue/runtime-core";

export default defineComponent({
    props: {
        modelValue: {
            type: String as PropType<string>,
            default: '测试'
        }
    },
    emits: ['update:modelValue']
})
</script>

<style lang="scss" scoped>
input {
    padding: 5px 8px;
    transition: .3s;
    background-color: #aaa;
    border-radius: 5px;
    outline: none;
    border: 0;

    &:focus {
        border: 1px solid springgreen;
    }
}
</style>